using System;
using System.Collections.Generic;
using System.Text;

namespace Engine
{
    public class Vector3
    {
        private float x;
        private float y;
        private float z;

        public Vector3(float x, float y, float z)
        {
            this.x = x;
            this.y = y;
            this.z = z;
        }

        // Operators
        public static Vector3 operator +( Vector3 vector1, Vector3 vector2 )
        {
            vector1.X += vector2.X;
            vector1.Y += vector2.Y;
            vector1.Z += vector2.Z;

            return vector1;
        }

        public static Vector3 operator -(Vector3 vector1, Vector3 vector2)
        {
            vector1.X -= vector2.X;
            vector1.Y -= vector2.Y;
            vector1.Z -= vector2.Z;

            return vector1;
        }

        public static Vector3 operator *(Vector3 vector1, Vector3 vector2)
        {
            vector1.X *= vector2.X;
            vector1.Y *= vector2.Y;
            vector1.Z *= vector2.Z;

            return vector1;
        }

        public static Vector3 operator /(Vector3 vector1, Vector3 vector2)
        {
            vector1.X /= vector2.X;
            vector1.Y /= vector2.Y;
            vector1.Z /= vector2.Z;

            return vector1;
        }

        public static Vector3 operator +(Vector3 vector, float value)
        {
            vector.X += value;
            vector.Y += value;
            vector.Z += value;

            return vector;
        }

        public static Vector3 operator -(Vector3 vector, float value)
        {
            vector.X -= value;
            vector.Y -= value;
            vector.Z -= value;

            return vector;
        }

        public static Vector3 operator *(Vector3 vector, float value)
        {
            vector.X *= value;
            vector.Y *= value;
            vector.Z *= value;

            return vector;
        }

        public static Vector3 operator /(Vector3 vector, float value)
        {
            vector.X /= value;
            vector.Y /= value;
            vector.Z /= value;

            return vector;
        }

        // Accessors
        public float X
        {
            get
            {
                return x;
            }
            set
            {
                x = value;
            }
        }

        public float Y
        {
            get
            {
                return y;
            }
            set
            {
                y = value;
            }
        }

        public float Z
        {
            get
            {
                return z;
            }
            set
            {
                z = value;
            }
        }
    }
}
